package cn.com.dhcc.turbo.entity.monitor.wapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import cn.com.dhcc.app.core.handler.dbhandler.WappedResultSet;
import cn.com.dhcc.turbo.entity.monitor.QuotaValueOnTime;

public class QuotaValueOnTimeRowWapper implements RowMapper<QuotaValueOnTime> {

	@Override
	public QuotaValueOnTime mapRow(ResultSet rss, int rowNum)
			throws SQLException {
		WappedResultSet rs = new WappedResultSet(rss);
		QuotaValueOnTime vo = new QuotaValueOnTime();
		vo.setId(rs.getString("id"));
		vo.setQuotaCode(rs.getString("quota_code"));
		vo.setQuotaName(rs.getString("quota_name"));
		vo.setCurrentValue1(rs.getString("current_value1"));
		vo.setCurrentValue2(rs.getString("current_value2"));
		vo.setCanMerge(rs.getString("can_merge"));
		vo.setStatus(rs.getString("status"));
		vo.setOwnerId(rs.getString("owner_id"));
		vo.setNeedAlert(rs.getString("needalert"));
		vo.setAlertMsg(rs.getString("alert_msg"));
		vo.setHasAlertMethod(rs.getString("has_alert_method"));
		vo.setMtime(rs.getTimestamp("mtime"));
		vo.setRemark(rs.getString("remark"));
		vo.setSumval(rs.getString("sumval"));
		vo.setStime(rs.getString("stime"));
		vo.setAlterLevel(rs.getString("alter_level"));
		vo.setHandlerTime(rs.getDate("handler_time"));
		return vo;
	}

}
